package com.mdinfo.db.test.system

import com.mdinfo.base.utils.HttpUtil
import org.junit.Test

/**
 * Created by Administrator on 2017/12/28.
 */

class MemberTest{

    @Test
    fun listQuery(){
        val url = "http://127.0.0.1:10000/sys/member/listQuery"
        val p = Pair("Authorization","eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblRpbWUiOjE1MTQ0Mzk3MjQzNDUsIm1lbWJlcklkIjo0fQ.zq5si59XisF8QVgQ4CgsjdyHd15rGwVWFNDbnq6lLqo")
        val headers = mapOf(p)
        var start = HttpUtil.FormBean("start","0")
        var num = HttpUtil.FormBean("num","10")
        var key = HttpUtil.FormBean("key","")
        var deptId = HttpUtil.FormBean("deptId","")
        val forms = listOf(start,num,key,deptId)
        HttpUtil.post(url,headers,forms)
    }

    @Test
    fun test01(){

        val url = "http://127.0.0.1:10000/sys/menu/test"
        val p = Pair("Authorization","eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblRpbWUiOjE1MTQ1MjY3NjE2MDUsIm1lbWJlcklkIjozfQ.XTbvKfAX2UElj59-iMmLOq5Y7bs_Mm4-yqDT2DYVzFQ")
        val headers = mapOf(p)
        var start = HttpUtil.FormBean("start","0")
        var num = HttpUtil.FormBean("num","10")
        var key = HttpUtil.FormBean("key","")
        var deptId = HttpUtil.FormBean("deptId","")
        val forms = listOf(start,num,key,deptId)
        HttpUtil.post(url,headers,forms)
    }
}

